home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / freesignal.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  70 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: freesignal.c,v 1.4 1996/08/13 13:56:02 digulla Exp $
  4.     $Log: freesignal.c,v $
  5.     Revision 1.4  1996/08/13 13:56:02  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:12  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include <exec/execbase.h>
  17. #include <exec/tasks.h>
  18. #include <aros/libcall.h>
  19.  
  20. /*****************************************************************************
  21.  
  22.     NAME */
  23.     #include <clib/exec_protos.h>
  24.  
  25.     __AROS_LH1(void, FreeSignal,
  26.  
  27. /*  SYNOPSIS */
  28.     __AROS_LHA(LONG, signalNum, D0),
  29.  
  30. /*  LOCATION */
  31.     struct ExecBase *, SysBase, 56, Exec)
  32.  
  33. /*  FUNCTION
  34.     Free a signal allocated with AllocSignal().
  35.  
  36.     INPUTS
  37.     signalNum - Number of the signal to free or -1 to do nothing.
  38.  
  39.     RESULT
  40.  
  41.     NOTES
  42.  
  43.     EXAMPLE
  44.  
  45.     BUGS
  46.  
  47.     SEE ALSO
  48.     AllocSignal(), Signal(), Wait()
  49.  
  50.     INTERNALS
  51.  
  52.     HISTORY
  53.  
  54. ******************************************************************************/
  55. {
  56.     __AROS_FUNC_INIT
  57.  
  58.     if(signalNum!=-1)
  59.     {
  60.     /* Nobody guarantees that the compiler will make it atomic. */
  61.     Forbid();
  62.  
  63.     /* Clear the bit */
  64.     SysBase->ThisTask->tc_SigAlloc&=~(1<<signalNum);
  65.     Permit();
  66.     }
  67.     __AROS_FUNC_EXIT
  68. }
  69.  
  70.